/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: yang
 * Date: 2022-05-07
 * Time: 14:21
 */
public class Main {
    public static boolean Judge(int[] nums){
        for (int i = 0; i < nums.length-1; i++) {
            if(nums[i+1] < nums[i]){
                return false;
            }
        }
        return true;
    }
    public static void main(String[] args) {
        int[]arr = {1,2,3,4,5};
        if(Judge(arr)){
            System.out.println("有序");
        }
        else{
            System.out.println("无序");
        }
    }
}
